package cn.xinfei.xdecision.common.dao.configcenter.rejectcode;

import cn.xinfei.xdecision.common.model.configcenter.rejectcode.model.RejectBranchCodeModel;
import cn.xinfei.xdecision.common.model.configcenter.rejectcode.po.RejectBranchCode;
import cn.xinfei.xdecision.common.model.configcenter.rejectcode.po.RejectCategory;
import cn.xinfei.xdecision.common.model.configcenter.rejectcode.po.RejectCode;
import cn.xinfei.xdecision.common.model.configcenter.rejectcode.po.RejectDiversionLabel;
import cn.xinfei.xdecision.common.model.configcenter.rejectcode.vo.RejectBranchCodeSearchReq;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by Yumou Wang on 2018/7/13.
 */
@Mapper
public interface RejectBranchCodeMapper extends BaseMapper<RejectBranchCodeModel> {

    void insertRejectCategory(@Param("rejectCategory") RejectCategory rejectCategory);

    RejectCategory getCategoryById(@Param("id") Long id);

    List<RejectCategory> getCategoryByParentId(@Param("parentId") Long parentId, @Param("organId") Long organId, @Param("name") String name);

    void insertRejectCode(@Param("rejectCode") RejectCode rejectCode);

    List<RejectCode> getRejectCodeByCategoryId(@Param("categoryId") Long categoryId, @Param("organId") Long organId, @Param("name") String name);

    void insertRejectBranchCode(RejectBranchCode branchCode);

    RejectCode getRejectCodeById(@Param("id") Long id);

    void updateRejectBranchCode(@Param("id") Long id, @Param("branchCode") RejectBranchCode rejectBranchCode);

    void removeRejectBranchCode(@Param("id") Long id);

    List<RejectBranchCode> getRejectBranchCode(@Param("rejectCodeId") Long rejectCodeId, @Param("name") String name);

    RejectBranchCode getBranchCodeById(Long id);

    List<RejectBranchCode> searchBranchCode(@Param("branchCode") RejectBranchCodeSearchReq rejectBranchCodeSearchReq);

    void insertRejectDiversionLabel(@Param("diversionLabel") RejectDiversionLabel diversionLabel);

    List<RejectDiversionLabel> getRejectDiversionLabelByName(@Param("name") String name, @Param("organId") Long organId);

    List<RejectDiversionLabel> getRejectDiversionLabelAll(@Param("orgIdList") List<Long> orgIdList);

    void updateRejectDiversionLabel(@Param("id") Long id, @Param("diversionLabel") RejectDiversionLabel diversionLabel);


}
